<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<title>netmiko.hp.hp_procurve API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
<link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:30px;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:1em 0 .50em 0}h3{font-size:1.4em;margin:25px 0 10px 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .3s ease-in-out}a:hover{color:#e82}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900}pre code{background:#f8f8f8;font-size:.8em;line-height:1.4em}code{background:#f2f2f1;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{background:#f8f8f8;border:0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0;padding:1ex}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-weight:bold;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em .5em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.item .name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul{padding-left:1.5em}.toc > ul > li{margin-top:.5em}}</style>
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js" integrity="sha256-Uv3H6lx7dJmRfRvH8TH6kJD1TSK1aFcwgx+mdg3epi8=" crossorigin></script>
<script>window.addEventListener('DOMContentLoaded', () => hljs.initHighlighting())</script>
</head>
<body>
<main>
<article id="content">
<header>
<h1 class="title">Module <code>netmiko.hp.hp_procurve</code></h1>
</header>
<section id="section-intro">
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">import re
import time
import socket
from os import path
from typing import Optional, Any

from paramiko import SSHClient
from netmiko.ssh_auth import SSHClient_noauth
from netmiko.cisco_base_connection import CiscoSSHConnection
from netmiko import log
from netmiko.exceptions import ReadTimeout


class HPProcurveBase(CiscoSSHConnection):
    def __init__(self, *args: Any, **kwargs: Any) -&gt; None:
        # ProCurve&#39;s seem to fail more on connection than they should?
        # increase conn_timeout to try to improve this.
        conn_timeout = kwargs.get(&#34;conn_timeout&#34;)
        kwargs[&#34;conn_timeout&#34;] = 20 if conn_timeout is None else conn_timeout

        disabled_algorithms = kwargs.get(&#34;disabled_algorithms&#34;)
        if disabled_algorithms is None:
            disabled_algorithms = {&#34;pubkeys&#34;: [&#34;rsa-sha2-256&#34;, &#34;rsa-sha2-512&#34;]}
            kwargs[&#34;disabled_algorithms&#34;] = disabled_algorithms

        super().__init__(*args, **kwargs)

    def session_preparation(self) -&gt; None:
        &#34;&#34;&#34;
        Prepare the session after the connection has been established.
        &#34;&#34;&#34;
        # HP output contains VT100 escape codes
        self.ansi_escape_codes = True

        # ProCurve has an odd behavior where the router prompt can show up
        # before the &#39;Press any key to continue&#39; message. Read up until the
        # Copyright banner to get past this.
        try:
            self.read_until_pattern(pattern=r&#34;.*opyright&#34;, read_timeout=1.3)
        except ReadTimeout:
            pass

        # Procurve uses &#39;Press any key to continue&#39;
        try:
            data = self.read_until_pattern(
                pattern=r&#34;(any key to continue|[&gt;#])&#34;, read_timeout=3.0
            )
            if &#34;any key to continue&#34; in data:
                self.write_channel(self.RETURN)
                self.read_until_pattern(pattern=r&#34;[&gt;#]&#34;, read_timeout=3.0)
        except ReadTimeout:
            pass

        self.set_base_prompt()
        # If prompt still looks odd, try one more time
        if len(self.base_prompt) &gt;= 25:
            self.set_base_prompt()

        # ProCurve requires elevated privileges to disable output paging :-(
        self.enable()
        self.set_terminal_width(command=&#34;terminal width 511&#34;, pattern=&#34;terminal&#34;)
        command = self.RETURN + &#34;no page&#34;
        self.disable_paging(command=command)

    def check_config_mode(
        self,
        check_string: str = &#34;)#&#34;,
        pattern: str = r&#34;[&gt;#]&#34;,
        force_regex: bool = False,
    ) -&gt; bool:
        &#34;&#34;&#34;
        The pattern is needed as it is not in the parent class.

        Not having this will make each check_config_mode() call take ~2 seconds.
        &#34;&#34;&#34;
        return super().check_config_mode(check_string=check_string, pattern=pattern)

    def enable(
        self,
        cmd: str = &#34;enable&#34;,
        pattern: str = &#34;password&#34;,
        enable_pattern: Optional[str] = None,
        re_flags: int = re.IGNORECASE,
        default_username: str = &#34;&#34;,
    ) -&gt; str:
        &#34;&#34;&#34;Enter enable mode&#34;&#34;&#34;

        if self.check_enable_mode():
            return &#34;&#34;
        if not default_username:
            default_username = self.username

        output = &#34;&#34;
        username_pattern = r&#34;(username|login|user name)&#34;
        pwd_pattern = pattern
        prompt_pattern = r&#34;[&gt;#]&#34;
        full_pattern = rf&#34;(username|login|user name|{pwd_pattern}|{prompt_pattern})&#34;

        # Send the enable command
        self.write_channel(cmd + self.RETURN)
        new_output = self.read_until_pattern(
            full_pattern, read_timeout=15, re_flags=re_flags
        )

        # Send the username
        if re.search(username_pattern, new_output, flags=re_flags):
            output += new_output
            self.write_channel(default_username + self.RETURN)
            full_pattern = rf&#34;({pwd_pattern}|{prompt_pattern})&#34;
            new_output = self.read_until_pattern(
                full_pattern, read_timeout=15, re_flags=re_flags
            )

        # Send the password
        if re.search(pwd_pattern, new_output, flags=re_flags):
            output += new_output
            self.write_channel(self.secret + self.RETURN)
            new_output = self.read_until_pattern(
                prompt_pattern, read_timeout=15, re_flags=re_flags
            )

        output += new_output
        log.debug(f&#34;{output}&#34;)
        self.clear_buffer()
        msg = (
            &#34;Failed to enter enable mode. Please ensure you pass &#34;
            &#34;the &#39;secret&#39; argument to ConnectHandler.&#34;
        )
        if not self.check_enable_mode():
            raise ValueError(msg)
        return output

    def cleanup(self, command: str = &#34;logout&#34;) -&gt; None:
        &#34;&#34;&#34;Gracefully exit the SSH session.&#34;&#34;&#34;

        # Exit configuration mode.
        try:
            if self.check_config_mode():
                self.exit_config_mode()
        except Exception:
            pass

        # Terminate SSH/telnet session
        self.write_channel(command + self.RETURN)

        output = &#34;&#34;
        for _ in range(10):

            # The connection might be dead here.
            try:
                # &#34;Do you want to log out&#34;
                # &#34;Do you want to save the current&#34;
                pattern = r&#34;Do you want.*&#34;
                new_output = self.read_until_pattern(pattern, read_timeout=1.5)
                output += new_output

                if &#34;Do you want to log out&#34; in new_output:
                    self.write_channel(&#34;y&#34; + self.RETURN)
                    break
                elif &#34;Do you want to save the current&#34; in new_output:
                    # Don&#39;t automatically save the config (user&#39;s responsibility)
                    self.write_channel(&#34;n&#34; + self.RETURN)
            except socket.error:
                break
            except ReadTimeout:
                break
            except Exception:
                break

            time.sleep(0.05)

        # Set outside of loop
        self._session_log_fin = True

    def save_config(
        self,
        cmd: str = &#34;write memory&#34;,
        confirm: bool = False,
        confirm_response: str = &#34;&#34;,
    ) -&gt; str:
        &#34;&#34;&#34;Save Config.&#34;&#34;&#34;
        return super().save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )


class HPProcurveSSH(HPProcurveBase):
    def _build_ssh_client(self) -&gt; SSHClient:
        &#34;&#34;&#34;Allow passwordless authentication for HP devices being provisioned.&#34;&#34;&#34;

        # Create instance of SSHClient object. If no SSH keys and no password, then use noauth
        remote_conn_pre: SSHClient
        if not self.use_keys and not self.password:
            remote_conn_pre = SSHClient_noauth()
        else:
            remote_conn_pre = SSHClient()

        # Load host_keys for better SSH security
        if self.system_host_keys:
            remote_conn_pre.load_system_host_keys()
        if self.alt_host_keys and path.isfile(self.alt_key_file):
            remote_conn_pre.load_host_keys(self.alt_key_file)

        # Default is to automatically add untrusted hosts (make sure appropriate for your env)
        remote_conn_pre.set_missing_host_key_policy(self.key_policy)
        return remote_conn_pre


class HPProcurveTelnet(HPProcurveBase):
    def telnet_login(
        self,
        pri_prompt_terminator: str = &#34;#&#34;,
        alt_prompt_terminator: str = &#34;&gt;&#34;,
        username_pattern: str = r&#34;(Login Name:|sername:)&#34;,
        pwd_pattern: str = r&#34;assword&#34;,
        delay_factor: float = 1.0,
        max_loops: int = 60,
    ) -&gt; str:
        &#34;&#34;&#34;Telnet login: can be username/password or just password.&#34;&#34;&#34;
        return super().telnet_login(
            pri_prompt_terminator=pri_prompt_terminator,
            alt_prompt_terminator=alt_prompt_terminator,
            username_pattern=username_pattern,
            pwd_pattern=pwd_pattern,
            delay_factor=delay_factor,
            max_loops=max_loops,
        )</code></pre>
</details>
</section>
<section>
</section>
<section>
</section>
<section>
</section>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="netmiko.hp.hp_procurve.HPProcurveBase"><code class="flex name class">
<span>class <span class="ident">HPProcurveBase</span></span>
<span>(</span><span>*args: Any, **kwargs: Any)</span>
</code></dt>
<dd>
<div class="desc"><p>Base Class for cisco-like behavior.</p>
<pre><code>    Initialize attributes for establishing connection to target device.

    :param ip: IP address of target device. Not required if &lt;code&gt;host&lt;/code&gt; is
        provided.

    :param host: Hostname of target device. Not required if &lt;code&gt;ip&lt;/code&gt; is
            provided.

    :param username: Username to authenticate against target device if
            required.

    :param password: Password to authenticate against target device if
            required.

    :param secret: The enable password if target device requires one.

    :param port: The destination port used to connect to the target
            device.

    :param device_type: Class selection based on device type.

    :param verbose: Enable additional messages to standard output.

    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).

    :param use_keys: Connect to target device using SSH keys.

    :param key_file: Filename path of the SSH key file to use.

    :param pkey: SSH key object to use.

    :param passphrase: Passphrase to use for encrypted key; password will be used for key
            decryption if not specified.

    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
            documentation for a description of the expected format.

    :param allow_agent: Enable use of SSH key-agent.

    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
            means unknown SSH host keys will be accepted).

    :param system_host_keys: Load host keys from the users known_hosts file.

    :param alt_host_keys: If &lt;code&gt;True&lt;/code&gt; host keys will be loaded from the file specified in
            alt_key_file.

    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).

    :param ssh_config_file: File name of OpenSSH configuration file.

    :param timeout: Connection timeout.

    :param session_timeout: Set a timeout for parallel requests.

    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.

    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).

    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
            Currently defaults to 0, for backwards compatibility (it will not attempt
            to keep the connection alive).

    :param default_enter: Character(s) to send to correspond to enter key (default:
</code></pre>
<p>).</p>
<pre><code>    :param response_return: Character(s) to use in normalized return data to represent
            enter key (default:
</code></pre>
<p>)</p>
<pre><code>    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
            to select smallest of global and specific. Sets default global_delay_factor to .1
            (default: True)

    :param session_log: File path or BufferedIOBase subclass object to write the session log to.

    :param session_log_record_writes: The session log generally only records channel reads due
            to eliminate command duplication due to command echo. You can enable this if you
            want to record both channel reads and channel writes in the log (default: False).

    :param session_log_file_mode: "write" or "append" for session_log file mode
            (default: "write")

    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
            (default: False)

    :param encoding: Encoding to be used when writing bytes to the output channel.
            (default: ascii)

    :param sock: An open socket or socket-like object (such as a &lt;code&gt;.Channel&lt;/code&gt;) to use for
            communication to the target host (default: None).

    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
            (default: None). Global attribute takes precedence over function &lt;code&gt;cmd\_verify&lt;/code&gt;
            argument. Value of &lt;code&gt;None&lt;/code&gt; indicates to use function &lt;code&gt;cmd\_verify&lt;/code&gt; argument.

    :param auto_connect: Control whether Netmiko automatically establishes the connection as
            part of the object creation (default: True).

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
            eliminated in Netmiko 5.x (default: False).
</code></pre></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class HPProcurveBase(CiscoSSHConnection):
    def __init__(self, *args: Any, **kwargs: Any) -&gt; None:
        # ProCurve&#39;s seem to fail more on connection than they should?
        # increase conn_timeout to try to improve this.
        conn_timeout = kwargs.get(&#34;conn_timeout&#34;)
        kwargs[&#34;conn_timeout&#34;] = 20 if conn_timeout is None else conn_timeout

        disabled_algorithms = kwargs.get(&#34;disabled_algorithms&#34;)
        if disabled_algorithms is None:
            disabled_algorithms = {&#34;pubkeys&#34;: [&#34;rsa-sha2-256&#34;, &#34;rsa-sha2-512&#34;]}
            kwargs[&#34;disabled_algorithms&#34;] = disabled_algorithms

        super().__init__(*args, **kwargs)

    def session_preparation(self) -&gt; None:
        &#34;&#34;&#34;
        Prepare the session after the connection has been established.
        &#34;&#34;&#34;
        # HP output contains VT100 escape codes
        self.ansi_escape_codes = True

        # ProCurve has an odd behavior where the router prompt can show up
        # before the &#39;Press any key to continue&#39; message. Read up until the
        # Copyright banner to get past this.
        try:
            self.read_until_pattern(pattern=r&#34;.*opyright&#34;, read_timeout=1.3)
        except ReadTimeout:
            pass

        # Procurve uses &#39;Press any key to continue&#39;
        try:
            data = self.read_until_pattern(
                pattern=r&#34;(any key to continue|[&gt;#])&#34;, read_timeout=3.0
            )
            if &#34;any key to continue&#34; in data:
                self.write_channel(self.RETURN)
                self.read_until_pattern(pattern=r&#34;[&gt;#]&#34;, read_timeout=3.0)
        except ReadTimeout:
            pass

        self.set_base_prompt()
        # If prompt still looks odd, try one more time
        if len(self.base_prompt) &gt;= 25:
            self.set_base_prompt()

        # ProCurve requires elevated privileges to disable output paging :-(
        self.enable()
        self.set_terminal_width(command=&#34;terminal width 511&#34;, pattern=&#34;terminal&#34;)
        command = self.RETURN + &#34;no page&#34;
        self.disable_paging(command=command)

    def check_config_mode(
        self,
        check_string: str = &#34;)#&#34;,
        pattern: str = r&#34;[&gt;#]&#34;,
        force_regex: bool = False,
    ) -&gt; bool:
        &#34;&#34;&#34;
        The pattern is needed as it is not in the parent class.

        Not having this will make each check_config_mode() call take ~2 seconds.
        &#34;&#34;&#34;
        return super().check_config_mode(check_string=check_string, pattern=pattern)

    def enable(
        self,
        cmd: str = &#34;enable&#34;,
        pattern: str = &#34;password&#34;,
        enable_pattern: Optional[str] = None,
        re_flags: int = re.IGNORECASE,
        default_username: str = &#34;&#34;,
    ) -&gt; str:
        &#34;&#34;&#34;Enter enable mode&#34;&#34;&#34;

        if self.check_enable_mode():
            return &#34;&#34;
        if not default_username:
            default_username = self.username

        output = &#34;&#34;
        username_pattern = r&#34;(username|login|user name)&#34;
        pwd_pattern = pattern
        prompt_pattern = r&#34;[&gt;#]&#34;
        full_pattern = rf&#34;(username|login|user name|{pwd_pattern}|{prompt_pattern})&#34;

        # Send the enable command
        self.write_channel(cmd + self.RETURN)
        new_output = self.read_until_pattern(
            full_pattern, read_timeout=15, re_flags=re_flags
        )

        # Send the username
        if re.search(username_pattern, new_output, flags=re_flags):
            output += new_output
            self.write_channel(default_username + self.RETURN)
            full_pattern = rf&#34;({pwd_pattern}|{prompt_pattern})&#34;
            new_output = self.read_until_pattern(
                full_pattern, read_timeout=15, re_flags=re_flags
            )

        # Send the password
        if re.search(pwd_pattern, new_output, flags=re_flags):
            output += new_output
            self.write_channel(self.secret + self.RETURN)
            new_output = self.read_until_pattern(
                prompt_pattern, read_timeout=15, re_flags=re_flags
            )

        output += new_output
        log.debug(f&#34;{output}&#34;)
        self.clear_buffer()
        msg = (
            &#34;Failed to enter enable mode. Please ensure you pass &#34;
            &#34;the &#39;secret&#39; argument to ConnectHandler.&#34;
        )
        if not self.check_enable_mode():
            raise ValueError(msg)
        return output

    def cleanup(self, command: str = &#34;logout&#34;) -&gt; None:
        &#34;&#34;&#34;Gracefully exit the SSH session.&#34;&#34;&#34;

        # Exit configuration mode.
        try:
            if self.check_config_mode():
                self.exit_config_mode()
        except Exception:
            pass

        # Terminate SSH/telnet session
        self.write_channel(command + self.RETURN)

        output = &#34;&#34;
        for _ in range(10):

            # The connection might be dead here.
            try:
                # &#34;Do you want to log out&#34;
                # &#34;Do you want to save the current&#34;
                pattern = r&#34;Do you want.*&#34;
                new_output = self.read_until_pattern(pattern, read_timeout=1.5)
                output += new_output

                if &#34;Do you want to log out&#34; in new_output:
                    self.write_channel(&#34;y&#34; + self.RETURN)
                    break
                elif &#34;Do you want to save the current&#34; in new_output:
                    # Don&#39;t automatically save the config (user&#39;s responsibility)
                    self.write_channel(&#34;n&#34; + self.RETURN)
            except socket.error:
                break
            except ReadTimeout:
                break
            except Exception:
                break

            time.sleep(0.05)

        # Set outside of loop
        self._session_log_fin = True

    def save_config(
        self,
        cmd: str = &#34;write memory&#34;,
        confirm: bool = False,
        confirm_response: str = &#34;&#34;,
    ) -&gt; str:
        &#34;&#34;&#34;Save Config.&#34;&#34;&#34;
        return super().save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="netmiko.cisco_base_connection.CiscoSSHConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoSSHConnection">CiscoSSHConnection</a></li>
<li><a title="netmiko.cisco_base_connection.CiscoBaseConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection">CiscoBaseConnection</a></li>
<li><a title="netmiko.base_connection.BaseConnection" href="../base_connection.html#netmiko.base_connection.BaseConnection">BaseConnection</a></li>
</ul>
<h3>Subclasses</h3>
<ul class="hlist">
<li><a title="netmiko.hp.hp_procurve.HPProcurveSSH" href="#netmiko.hp.hp_procurve.HPProcurveSSH">HPProcurveSSH</a></li>
<li><a title="netmiko.hp.hp_procurve.HPProcurveTelnet" href="#netmiko.hp.hp_procurve.HPProcurveTelnet">HPProcurveTelnet</a></li>
</ul>
<h3>Methods</h3>
<dl>
<dt id="netmiko.hp.hp_procurve.HPProcurveBase.check_config_mode"><code class="name flex">
<span>def <span class="ident">check_config_mode</span></span>(<span>self, check_string: str = ')#', pattern: str = &#x27;[&gt;#]&#x27;, force_regex: bool = False) ‑> bool</span>
</code></dt>
<dd>
<div class="desc"><p>The pattern is needed as it is not in the parent class.</p>
<p>Not having this will make each check_config_mode() call take ~2 seconds.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def check_config_mode(
    self,
    check_string: str = &#34;)#&#34;,
    pattern: str = r&#34;[&gt;#]&#34;,
    force_regex: bool = False,
) -&gt; bool:
    &#34;&#34;&#34;
    The pattern is needed as it is not in the parent class.

    Not having this will make each check_config_mode() call take ~2 seconds.
    &#34;&#34;&#34;
    return super().check_config_mode(check_string=check_string, pattern=pattern)</code></pre>
</details>
</dd>
<dt id="netmiko.hp.hp_procurve.HPProcurveBase.enable"><code class="name flex">
<span>def <span class="ident">enable</span></span>(<span>self, cmd: str = 'enable', pattern: str = 'password', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE, default_username: str = '') ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Enter enable mode</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def enable(
    self,
    cmd: str = &#34;enable&#34;,
    pattern: str = &#34;password&#34;,
    enable_pattern: Optional[str] = None,
    re_flags: int = re.IGNORECASE,
    default_username: str = &#34;&#34;,
) -&gt; str:
    &#34;&#34;&#34;Enter enable mode&#34;&#34;&#34;

    if self.check_enable_mode():
        return &#34;&#34;
    if not default_username:
        default_username = self.username

    output = &#34;&#34;
    username_pattern = r&#34;(username|login|user name)&#34;
    pwd_pattern = pattern
    prompt_pattern = r&#34;[&gt;#]&#34;
    full_pattern = rf&#34;(username|login|user name|{pwd_pattern}|{prompt_pattern})&#34;

    # Send the enable command
    self.write_channel(cmd + self.RETURN)
    new_output = self.read_until_pattern(
        full_pattern, read_timeout=15, re_flags=re_flags
    )

    # Send the username
    if re.search(username_pattern, new_output, flags=re_flags):
        output += new_output
        self.write_channel(default_username + self.RETURN)
        full_pattern = rf&#34;({pwd_pattern}|{prompt_pattern})&#34;
        new_output = self.read_until_pattern(
            full_pattern, read_timeout=15, re_flags=re_flags
        )

    # Send the password
    if re.search(pwd_pattern, new_output, flags=re_flags):
        output += new_output
        self.write_channel(self.secret + self.RETURN)
        new_output = self.read_until_pattern(
            prompt_pattern, read_timeout=15, re_flags=re_flags
        )

    output += new_output
    log.debug(f&#34;{output}&#34;)
    self.clear_buffer()
    msg = (
        &#34;Failed to enter enable mode. Please ensure you pass &#34;
        &#34;the &#39;secret&#39; argument to ConnectHandler.&#34;
    )
    if not self.check_enable_mode():
        raise ValueError(msg)
    return output</code></pre>
</details>
</dd>
<dt id="netmiko.hp.hp_procurve.HPProcurveBase.save_config"><code class="name flex">
<span>def <span class="ident">save_config</span></span>(<span>self, cmd: str = 'write memory', confirm: bool = False, confirm_response: str = '') ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Save Config.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def save_config(
    self,
    cmd: str = &#34;write memory&#34;,
    confirm: bool = False,
    confirm_response: str = &#34;&#34;,
) -&gt; str:
    &#34;&#34;&#34;Save Config.&#34;&#34;&#34;
    return super().save_config(
        cmd=cmd, confirm=confirm, confirm_response=confirm_response
    )</code></pre>
</details>
</dd>
<dt id="netmiko.hp.hp_procurve.HPProcurveBase.session_preparation"><code class="name flex">
<span>def <span class="ident">session_preparation</span></span>(<span>self) ‑> None</span>
</code></dt>
<dd>
<div class="desc"><p>Prepare the session after the connection has been established.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def session_preparation(self) -&gt; None:
    &#34;&#34;&#34;
    Prepare the session after the connection has been established.
    &#34;&#34;&#34;
    # HP output contains VT100 escape codes
    self.ansi_escape_codes = True

    # ProCurve has an odd behavior where the router prompt can show up
    # before the &#39;Press any key to continue&#39; message. Read up until the
    # Copyright banner to get past this.
    try:
        self.read_until_pattern(pattern=r&#34;.*opyright&#34;, read_timeout=1.3)
    except ReadTimeout:
        pass

    # Procurve uses &#39;Press any key to continue&#39;
    try:
        data = self.read_until_pattern(
            pattern=r&#34;(any key to continue|[&gt;#])&#34;, read_timeout=3.0
        )
        if &#34;any key to continue&#34; in data:
            self.write_channel(self.RETURN)
            self.read_until_pattern(pattern=r&#34;[&gt;#]&#34;, read_timeout=3.0)
    except ReadTimeout:
        pass

    self.set_base_prompt()
    # If prompt still looks odd, try one more time
    if len(self.base_prompt) &gt;= 25:
        self.set_base_prompt()

    # ProCurve requires elevated privileges to disable output paging :-(
    self.enable()
    self.set_terminal_width(command=&#34;terminal width 511&#34;, pattern=&#34;terminal&#34;)
    command = self.RETURN + &#34;no page&#34;
    self.disable_paging(command=command)</code></pre>
</details>
</dd>
</dl>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="netmiko.cisco_base_connection.CiscoSSHConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoSSHConnection">CiscoSSHConnection</a></b></code>:
<ul class="hlist">
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.check_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.check_enable_mode">check_enable_mode</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.cleanup" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.cleanup">cleanup</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.clear_buffer" href="../base_connection.html#netmiko.base_connection.BaseConnection.clear_buffer">clear_buffer</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.commit" href="../base_connection.html#netmiko.base_connection.BaseConnection.commit">commit</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.config_mode" href="../base_connection.html#netmiko.base_connection.BaseConnection.config_mode">config_mode</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.disable_paging" href="../base_connection.html#netmiko.base_connection.BaseConnection.disable_paging">disable_paging</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.disconnect" href="../base_connection.html#netmiko.base_connection.BaseConnection.disconnect">disconnect</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.establish_connection" href="../base_connection.html#netmiko.base_connection.BaseConnection.establish_connection">establish_connection</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.exit_config_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_config_mode">exit_config_mode</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.exit_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_enable_mode">exit_enable_mode</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.find_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.find_prompt">find_prompt</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.is_alive" href="../base_connection.html#netmiko.base_connection.BaseConnection.is_alive">is_alive</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.normalize_cmd" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_cmd">normalize_cmd</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.normalize_linefeeds" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_linefeeds">normalize_linefeeds</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.paramiko_cleanup" href="../base_connection.html#netmiko.base_connection.BaseConnection.paramiko_cleanup">paramiko_cleanup</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.read_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel">read_channel</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.read_channel_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel_timing">read_channel_timing</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.read_until_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_pattern">read_until_pattern</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.read_until_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt">read_until_prompt</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.read_until_prompt_or_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt_or_pattern">read_until_prompt_or_pattern</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.run_ttp" href="../base_connection.html#netmiko.base_connection.BaseConnection.run_ttp">run_ttp</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.select_delay_factor" href="../base_connection.html#netmiko.base_connection.BaseConnection.select_delay_factor">select_delay_factor</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.send_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command">send_command</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.send_command_expect" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_expect">send_command_expect</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.send_command_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_timing">send_command_timing</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.send_config_from_file" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_from_file">send_config_from_file</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.send_config_set" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_set">send_config_set</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.send_multiline" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_multiline">send_multiline</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.set_base_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_base_prompt">set_base_prompt</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.set_terminal_width" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_terminal_width">set_terminal_width</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.special_login_handler" href="../base_connection.html#netmiko.base_connection.BaseConnection.special_login_handler">special_login_handler</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.strip_ansi_escape_codes" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_ansi_escape_codes">strip_ansi_escape_codes</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.strip_backspaces" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_backspaces">strip_backspaces</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.strip_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_command">strip_command</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.strip_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_prompt">strip_prompt</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.telnet_login" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.telnet_login">telnet_login</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoSSHConnection.write_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.write_channel">write_channel</a></code></li>
</ul>
</li>
</ul>
</dd>
<dt id="netmiko.hp.hp_procurve.HPProcurveSSH"><code class="flex name class">
<span>class <span class="ident">HPProcurveSSH</span></span>
<span>(</span><span>*args: Any, **kwargs: Any)</span>
</code></dt>
<dd>
<div class="desc"><p>Base Class for cisco-like behavior.</p>
<pre><code>    Initialize attributes for establishing connection to target device.

    :param ip: IP address of target device. Not required if &lt;code&gt;host&lt;/code&gt; is
        provided.

    :param host: Hostname of target device. Not required if &lt;code&gt;ip&lt;/code&gt; is
            provided.

    :param username: Username to authenticate against target device if
            required.

    :param password: Password to authenticate against target device if
            required.

    :param secret: The enable password if target device requires one.

    :param port: The destination port used to connect to the target
            device.

    :param device_type: Class selection based on device type.

    :param verbose: Enable additional messages to standard output.

    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).

    :param use_keys: Connect to target device using SSH keys.

    :param key_file: Filename path of the SSH key file to use.

    :param pkey: SSH key object to use.

    :param passphrase: Passphrase to use for encrypted key; password will be used for key
            decryption if not specified.

    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
            documentation for a description of the expected format.

    :param allow_agent: Enable use of SSH key-agent.

    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
            means unknown SSH host keys will be accepted).

    :param system_host_keys: Load host keys from the users known_hosts file.

    :param alt_host_keys: If &lt;code&gt;True&lt;/code&gt; host keys will be loaded from the file specified in
            alt_key_file.

    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).

    :param ssh_config_file: File name of OpenSSH configuration file.

    :param timeout: Connection timeout.

    :param session_timeout: Set a timeout for parallel requests.

    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.

    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).

    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
            Currently defaults to 0, for backwards compatibility (it will not attempt
            to keep the connection alive).

    :param default_enter: Character(s) to send to correspond to enter key (default:
</code></pre>
<p>).</p>
<pre><code>    :param response_return: Character(s) to use in normalized return data to represent
            enter key (default:
</code></pre>
<p>)</p>
<pre><code>    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
            to select smallest of global and specific. Sets default global_delay_factor to .1
            (default: True)

    :param session_log: File path or BufferedIOBase subclass object to write the session log to.

    :param session_log_record_writes: The session log generally only records channel reads due
            to eliminate command duplication due to command echo. You can enable this if you
            want to record both channel reads and channel writes in the log (default: False).

    :param session_log_file_mode: "write" or "append" for session_log file mode
            (default: "write")

    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
            (default: False)

    :param encoding: Encoding to be used when writing bytes to the output channel.
            (default: ascii)

    :param sock: An open socket or socket-like object (such as a &lt;code&gt;.Channel&lt;/code&gt;) to use for
            communication to the target host (default: None).

    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
            (default: None). Global attribute takes precedence over function &lt;code&gt;cmd\_verify&lt;/code&gt;
            argument. Value of &lt;code&gt;None&lt;/code&gt; indicates to use function &lt;code&gt;cmd\_verify&lt;/code&gt; argument.

    :param auto_connect: Control whether Netmiko automatically establishes the connection as
            part of the object creation (default: True).

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
            eliminated in Netmiko 5.x (default: False).
</code></pre></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class HPProcurveSSH(HPProcurveBase):
    def _build_ssh_client(self) -&gt; SSHClient:
        &#34;&#34;&#34;Allow passwordless authentication for HP devices being provisioned.&#34;&#34;&#34;

        # Create instance of SSHClient object. If no SSH keys and no password, then use noauth
        remote_conn_pre: SSHClient
        if not self.use_keys and not self.password:
            remote_conn_pre = SSHClient_noauth()
        else:
            remote_conn_pre = SSHClient()

        # Load host_keys for better SSH security
        if self.system_host_keys:
            remote_conn_pre.load_system_host_keys()
        if self.alt_host_keys and path.isfile(self.alt_key_file):
            remote_conn_pre.load_host_keys(self.alt_key_file)

        # Default is to automatically add untrusted hosts (make sure appropriate for your env)
        remote_conn_pre.set_missing_host_key_policy(self.key_policy)
        return remote_conn_pre</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="netmiko.hp.hp_procurve.HPProcurveBase" href="#netmiko.hp.hp_procurve.HPProcurveBase">HPProcurveBase</a></li>
<li><a title="netmiko.cisco_base_connection.CiscoSSHConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoSSHConnection">CiscoSSHConnection</a></li>
<li><a title="netmiko.cisco_base_connection.CiscoBaseConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection">CiscoBaseConnection</a></li>
<li><a title="netmiko.base_connection.BaseConnection" href="../base_connection.html#netmiko.base_connection.BaseConnection">BaseConnection</a></li>
</ul>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="netmiko.hp.hp_procurve.HPProcurveBase" href="#netmiko.hp.hp_procurve.HPProcurveBase">HPProcurveBase</a></b></code>:
<ul class="hlist">
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.check_config_mode" href="#netmiko.hp.hp_procurve.HPProcurveBase.check_config_mode">check_config_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.check_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.check_enable_mode">check_enable_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.cleanup" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.cleanup">cleanup</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.clear_buffer" href="../base_connection.html#netmiko.base_connection.BaseConnection.clear_buffer">clear_buffer</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.commit" href="../base_connection.html#netmiko.base_connection.BaseConnection.commit">commit</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.config_mode" href="../base_connection.html#netmiko.base_connection.BaseConnection.config_mode">config_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.disable_paging" href="../base_connection.html#netmiko.base_connection.BaseConnection.disable_paging">disable_paging</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.disconnect" href="../base_connection.html#netmiko.base_connection.BaseConnection.disconnect">disconnect</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.enable" href="#netmiko.hp.hp_procurve.HPProcurveBase.enable">enable</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.establish_connection" href="../base_connection.html#netmiko.base_connection.BaseConnection.establish_connection">establish_connection</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.exit_config_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_config_mode">exit_config_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.exit_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_enable_mode">exit_enable_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.find_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.find_prompt">find_prompt</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.is_alive" href="../base_connection.html#netmiko.base_connection.BaseConnection.is_alive">is_alive</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.normalize_cmd" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_cmd">normalize_cmd</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.normalize_linefeeds" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_linefeeds">normalize_linefeeds</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.paramiko_cleanup" href="../base_connection.html#netmiko.base_connection.BaseConnection.paramiko_cleanup">paramiko_cleanup</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel">read_channel</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_channel_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel_timing">read_channel_timing</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_until_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_pattern">read_until_pattern</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_until_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt">read_until_prompt</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_until_prompt_or_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt_or_pattern">read_until_prompt_or_pattern</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.run_ttp" href="../base_connection.html#netmiko.base_connection.BaseConnection.run_ttp">run_ttp</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.save_config" href="#netmiko.hp.hp_procurve.HPProcurveBase.save_config">save_config</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.select_delay_factor" href="../base_connection.html#netmiko.base_connection.BaseConnection.select_delay_factor">select_delay_factor</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command">send_command</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_command_expect" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_expect">send_command_expect</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_command_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_timing">send_command_timing</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_config_from_file" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_from_file">send_config_from_file</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_config_set" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_set">send_config_set</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_multiline" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_multiline">send_multiline</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.session_preparation" href="#netmiko.hp.hp_procurve.HPProcurveBase.session_preparation">session_preparation</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.set_base_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_base_prompt">set_base_prompt</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.set_terminal_width" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_terminal_width">set_terminal_width</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.special_login_handler" href="../base_connection.html#netmiko.base_connection.BaseConnection.special_login_handler">special_login_handler</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.strip_ansi_escape_codes" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_ansi_escape_codes">strip_ansi_escape_codes</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.strip_backspaces" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_backspaces">strip_backspaces</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.strip_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_command">strip_command</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.strip_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_prompt">strip_prompt</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.telnet_login" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.telnet_login">telnet_login</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.write_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.write_channel">write_channel</a></code></li>
</ul>
</li>
</ul>
</dd>
<dt id="netmiko.hp.hp_procurve.HPProcurveTelnet"><code class="flex name class">
<span>class <span class="ident">HPProcurveTelnet</span></span>
<span>(</span><span>*args: Any, **kwargs: Any)</span>
</code></dt>
<dd>
<div class="desc"><p>Base Class for cisco-like behavior.</p>
<pre><code>    Initialize attributes for establishing connection to target device.

    :param ip: IP address of target device. Not required if &lt;code&gt;host&lt;/code&gt; is
        provided.

    :param host: Hostname of target device. Not required if &lt;code&gt;ip&lt;/code&gt; is
            provided.

    :param username: Username to authenticate against target device if
            required.

    :param password: Password to authenticate against target device if
            required.

    :param secret: The enable password if target device requires one.

    :param port: The destination port used to connect to the target
            device.

    :param device_type: Class selection based on device type.

    :param verbose: Enable additional messages to standard output.

    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).

    :param use_keys: Connect to target device using SSH keys.

    :param key_file: Filename path of the SSH key file to use.

    :param pkey: SSH key object to use.

    :param passphrase: Passphrase to use for encrypted key; password will be used for key
            decryption if not specified.

    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
            documentation for a description of the expected format.

    :param allow_agent: Enable use of SSH key-agent.

    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
            means unknown SSH host keys will be accepted).

    :param system_host_keys: Load host keys from the users known_hosts file.

    :param alt_host_keys: If &lt;code&gt;True&lt;/code&gt; host keys will be loaded from the file specified in
            alt_key_file.

    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).

    :param ssh_config_file: File name of OpenSSH configuration file.

    :param timeout: Connection timeout.

    :param session_timeout: Set a timeout for parallel requests.

    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.

    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).

    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
            Currently defaults to 0, for backwards compatibility (it will not attempt
            to keep the connection alive).

    :param default_enter: Character(s) to send to correspond to enter key (default:
</code></pre>
<p>).</p>
<pre><code>    :param response_return: Character(s) to use in normalized return data to represent
            enter key (default:
</code></pre>
<p>)</p>
<pre><code>    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
            to select smallest of global and specific. Sets default global_delay_factor to .1
            (default: True)

    :param session_log: File path or BufferedIOBase subclass object to write the session log to.

    :param session_log_record_writes: The session log generally only records channel reads due
            to eliminate command duplication due to command echo. You can enable this if you
            want to record both channel reads and channel writes in the log (default: False).

    :param session_log_file_mode: "write" or "append" for session_log file mode
            (default: "write")

    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
            (default: False)

    :param encoding: Encoding to be used when writing bytes to the output channel.
            (default: ascii)

    :param sock: An open socket or socket-like object (such as a &lt;code&gt;.Channel&lt;/code&gt;) to use for
            communication to the target host (default: None).

    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
            (default: None). Global attribute takes precedence over function &lt;code&gt;cmd\_verify&lt;/code&gt;
            argument. Value of &lt;code&gt;None&lt;/code&gt; indicates to use function &lt;code&gt;cmd\_verify&lt;/code&gt; argument.

    :param auto_connect: Control whether Netmiko automatically establishes the connection as
            part of the object creation (default: True).

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
            eliminated in Netmiko 5.x (default: False).
</code></pre></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class HPProcurveTelnet(HPProcurveBase):
    def telnet_login(
        self,
        pri_prompt_terminator: str = &#34;#&#34;,
        alt_prompt_terminator: str = &#34;&gt;&#34;,
        username_pattern: str = r&#34;(Login Name:|sername:)&#34;,
        pwd_pattern: str = r&#34;assword&#34;,
        delay_factor: float = 1.0,
        max_loops: int = 60,
    ) -&gt; str:
        &#34;&#34;&#34;Telnet login: can be username/password or just password.&#34;&#34;&#34;
        return super().telnet_login(
            pri_prompt_terminator=pri_prompt_terminator,
            alt_prompt_terminator=alt_prompt_terminator,
            username_pattern=username_pattern,
            pwd_pattern=pwd_pattern,
            delay_factor=delay_factor,
            max_loops=max_loops,
        )</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="netmiko.hp.hp_procurve.HPProcurveBase" href="#netmiko.hp.hp_procurve.HPProcurveBase">HPProcurveBase</a></li>
<li><a title="netmiko.cisco_base_connection.CiscoSSHConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoSSHConnection">CiscoSSHConnection</a></li>
<li><a title="netmiko.cisco_base_connection.CiscoBaseConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection">CiscoBaseConnection</a></li>
<li><a title="netmiko.base_connection.BaseConnection" href="../base_connection.html#netmiko.base_connection.BaseConnection">BaseConnection</a></li>
</ul>
<h3>Methods</h3>
<dl>
<dt id="netmiko.hp.hp_procurve.HPProcurveTelnet.telnet_login"><code class="name flex">
<span>def <span class="ident">telnet_login</span></span>(<span>self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = &#x27;&gt;&#x27;, username_pattern: str = '(Login Name:|sername:)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 60) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Telnet login: can be username/password or just password.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def telnet_login(
    self,
    pri_prompt_terminator: str = &#34;#&#34;,
    alt_prompt_terminator: str = &#34;&gt;&#34;,
    username_pattern: str = r&#34;(Login Name:|sername:)&#34;,
    pwd_pattern: str = r&#34;assword&#34;,
    delay_factor: float = 1.0,
    max_loops: int = 60,
) -&gt; str:
    &#34;&#34;&#34;Telnet login: can be username/password or just password.&#34;&#34;&#34;
    return super().telnet_login(
        pri_prompt_terminator=pri_prompt_terminator,
        alt_prompt_terminator=alt_prompt_terminator,
        username_pattern=username_pattern,
        pwd_pattern=pwd_pattern,
        delay_factor=delay_factor,
        max_loops=max_loops,
    )</code></pre>
</details>
</dd>
</dl>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="netmiko.hp.hp_procurve.HPProcurveBase" href="#netmiko.hp.hp_procurve.HPProcurveBase">HPProcurveBase</a></b></code>:
<ul class="hlist">
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.check_config_mode" href="#netmiko.hp.hp_procurve.HPProcurveBase.check_config_mode">check_config_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.check_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.check_enable_mode">check_enable_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.cleanup" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.cleanup">cleanup</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.clear_buffer" href="../base_connection.html#netmiko.base_connection.BaseConnection.clear_buffer">clear_buffer</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.commit" href="../base_connection.html#netmiko.base_connection.BaseConnection.commit">commit</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.config_mode" href="../base_connection.html#netmiko.base_connection.BaseConnection.config_mode">config_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.disable_paging" href="../base_connection.html#netmiko.base_connection.BaseConnection.disable_paging">disable_paging</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.disconnect" href="../base_connection.html#netmiko.base_connection.BaseConnection.disconnect">disconnect</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.enable" href="#netmiko.hp.hp_procurve.HPProcurveBase.enable">enable</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.establish_connection" href="../base_connection.html#netmiko.base_connection.BaseConnection.establish_connection">establish_connection</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.exit_config_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_config_mode">exit_config_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.exit_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_enable_mode">exit_enable_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.find_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.find_prompt">find_prompt</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.is_alive" href="../base_connection.html#netmiko.base_connection.BaseConnection.is_alive">is_alive</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.normalize_cmd" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_cmd">normalize_cmd</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.normalize_linefeeds" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_linefeeds">normalize_linefeeds</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.paramiko_cleanup" href="../base_connection.html#netmiko.base_connection.BaseConnection.paramiko_cleanup">paramiko_cleanup</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel">read_channel</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_channel_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel_timing">read_channel_timing</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_until_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_pattern">read_until_pattern</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_until_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt">read_until_prompt</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.read_until_prompt_or_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt_or_pattern">read_until_prompt_or_pattern</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.run_ttp" href="../base_connection.html#netmiko.base_connection.BaseConnection.run_ttp">run_ttp</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.save_config" href="#netmiko.hp.hp_procurve.HPProcurveBase.save_config">save_config</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.select_delay_factor" href="../base_connection.html#netmiko.base_connection.BaseConnection.select_delay_factor">select_delay_factor</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command">send_command</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_command_expect" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_expect">send_command_expect</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_command_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_timing">send_command_timing</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_config_from_file" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_from_file">send_config_from_file</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_config_set" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_set">send_config_set</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.send_multiline" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_multiline">send_multiline</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.session_preparation" href="#netmiko.hp.hp_procurve.HPProcurveBase.session_preparation">session_preparation</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.set_base_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_base_prompt">set_base_prompt</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.set_terminal_width" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_terminal_width">set_terminal_width</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.special_login_handler" href="../base_connection.html#netmiko.base_connection.BaseConnection.special_login_handler">special_login_handler</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.strip_ansi_escape_codes" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_ansi_escape_codes">strip_ansi_escape_codes</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.strip_backspaces" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_backspaces">strip_backspaces</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.strip_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_command">strip_command</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.strip_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_prompt">strip_prompt</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.write_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.write_channel">write_channel</a></code></li>
</ul>
</li>
</ul>
</dd>
</dl>
</section>
</article>
<nav id="sidebar">
<h1>Index</h1>
<div class="toc">
<ul></ul>
</div>
<ul id="index">
<li><h3>Super-module</h3>
<ul>
<li><code><a title="netmiko.hp" href="index.html">netmiko.hp</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="netmiko.hp.hp_procurve.HPProcurveBase" href="#netmiko.hp.hp_procurve.HPProcurveBase">HPProcurveBase</a></code></h4>
<ul class="">
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.check_config_mode" href="#netmiko.hp.hp_procurve.HPProcurveBase.check_config_mode">check_config_mode</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.enable" href="#netmiko.hp.hp_procurve.HPProcurveBase.enable">enable</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.save_config" href="#netmiko.hp.hp_procurve.HPProcurveBase.save_config">save_config</a></code></li>
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveBase.session_preparation" href="#netmiko.hp.hp_procurve.HPProcurveBase.session_preparation">session_preparation</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="netmiko.hp.hp_procurve.HPProcurveSSH" href="#netmiko.hp.hp_procurve.HPProcurveSSH">HPProcurveSSH</a></code></h4>
</li>
<li>
<h4><code><a title="netmiko.hp.hp_procurve.HPProcurveTelnet" href="#netmiko.hp.hp_procurve.HPProcurveTelnet">HPProcurveTelnet</a></code></h4>
<ul class="">
<li><code><a title="netmiko.hp.hp_procurve.HPProcurveTelnet.telnet_login" href="#netmiko.hp.hp_procurve.HPProcurveTelnet.telnet_login">telnet_login</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
</footer>
</body>
</html>